Skip to content

Activity pause support #482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2025
Merged

Activity pause support #482

merged 3 commits into from
May 27, 2025

Conversation

cretz
Copy link
Member

@cretz cretz commented May 16, 2025

What was changed

  • Added ActivityCancellationDetails with cancellation information
  • Added ActivityExecutionContext.CancellationDetails which returns an instance of cancellation details upon cancel
  • Added ActviityCancelReason.Paused
  • Added support for setting cancellation details in activity testing environment

Checklist

  1. Closes Heartbeating activities should be interrupted when the activities are paused. #441

@cretz cretz requested a review from a team as a code owner May 16, 2025 19:56
Comment on lines +21 to +22
/// Gets a value indicating whether the activity timeout caused activity to be marked
/// cancelled.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Gets a value indicating whether the activity timeout caused activity to be marked
/// cancelled.
/// Gets a value indicating whether the activity is timed out.

Technically this can be set true without it being the cause I think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without it being the singular cause, true, but it is one of the causes. I guess I was using the word "caused" here to clarify that this is not true if it is timed out, it is true if timeout was one of the causes that tripped cancellation. You can trip cancellation for something else and then timeout.

@cretz cretz merged commit 864e654 into temporalio:main May 27, 2025
9 checks passed
@cretz cretz deleted the activity-pause branch May 27, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Heartbeating activities should be interrupted when the activities are paused.
2 participants